//
//  QSwiftBox.swift
//  QSwiftBox
//
//  Created by carefree on 2020/3/3.
//  Copyright © 2020 Carefree. All rights reserved.
//

import Foundation

// MARK: - QSwiftBox命名空间
public final class QSwiftBox<Base> {
    public let base: Base
    public init(_ base: Base) {
        self.base = base
    }
}

public protocol QSwiftBoxCompatible {
    associatedtype CompatibleType
    var qs: CompatibleType { get }
}

public extension QSwiftBoxCompatible {
    var qs: QSwiftBox<Self> {
        return QSwiftBox(self)
    }
}

//添加qs扩展
extension NSObject: QSwiftBoxCompatible { }

